﻿using Microsoft.Phone.Shell;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Navigation;

namespace SMARTMobile.WinPhone
{
    public interface IWinPhoneViewModel
    {
        string ViewName { get; set; }

        void Initialize(Uri page);

        void Reset(); // called manually

        void PageLoaded(Uri page);
        void PageUnloaded(Uri page);

        void OnBackKeyPress(CancelEventArgs args);
        void NavigatedTo(NavigationMode mode, Uri uri, IDictionary<string, string> queryString);
        void NavigatedFrom(NavigationMode mode, Uri uri, IDictionary<string, string> queryString);

        #region Application Bar

        PhoneApplicationBar ApplicationBar { get; set; }

        void ApplicationBarStateChanged(bool isMenuVisible);
        void ApplicationBarButtonClick(IApplicationBarIconButton button);
        void ApplicationBarMenuClick(IApplicationBarMenuItem menuItem);

        #endregion

        #region Tombstoning

        void SaveState(IDictionary<string, object> state);
        void RestoreState(IDictionary<string, object> state);

        #endregion
    }
}
